1. Field of the Invention
The present invention relates to a sequentially accessed semiconductor memory device and to a method of controlling writing of data to a sequentially accessed semiconductor memory device.
2. Description of the Related Art
Rewritable semiconductor memory devices, such as EEPROMs, flash ROM, and the like, are used broadly as memory devices in a variety of electronic equipment. In electronic devices, this type of semiconductor memory device is not limited in terms of overwriting inputted data that fulfills data conditions established in advance, however, in some cases it would be desirable to use these semiconductor memory devices under conditions that restrict the overwriting with input data that does not fulfill these data conditions. For example, such conditions may include, for example, “perform writing only if the write data is larger than the data that is recorded in the semiconductor memory device (hereinafter termed the “data to be overwritten”),” or the condition of “perform writing only if the write data is smaller than the data to be overwritten.”
However, conventional rewritable semiconductor memory devices have no system by which to limit the overwriting of data, and because it is possible to overwrite data that has been stored if the prescribed sequence for writing data is performed, it has not been possible to apply data conditions, such as described above, to overwriting.
Note that, as technologies for controlling the writing of data to a memory device, there is a known technology for providing a write-prevention device for a memory device external to said memory device, and a known technology for preventing writing to a data storage area when the memory device is as used by writing data indicating the prohibition of writing to a data storage area with an address beyond a particular data storage area in the memory device.
Moreover, Semiconductor memory devices that allow only sequential access to the data cells of a memory array, for example, EEPROMs, are known. This kind of semiconductor memory device is relatively inexpensive, so is used as a storage device for holding data related to the remaining volume of or consumed volume of consumer goods. Here, consumer goods decrease with use, so when the data used for updating, specifically, the data written to the memory array is data relating to consumption volume, the value of the written data must be a value that is greater than the value of the existing data already stored in the memory array. Meanwhile, when the data written to the memory array is data relating to the remaining volume, the value of the written data must be a value that is smaller than the value of the existing data already stored in the memory array.